package com.june.springmvc.service.impl;

import com.june.springmvc.mapper.ItemsMapper;
import com.june.springmvc.pojo.Items;
import com.june.springmvc.pojo.ItemsExample;
import com.june.springmvc.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class ItemServiceImpl implements ItemService {

    @Autowired
    private ItemsMapper itemsMapper;

    @Override
    public List<Items> getItemList() {
        //没有查询条件 直接查询所有
        ItemsExample example = new ItemsExample();
        List<Items> items = itemsMapper.selectByExampleWithBLOBs(example);
        return items;
    }
}
